Focus detection system employing multiple area light distribution sensors

ABSTRACT

A focus detection system for detecting a focus state of an object lens, includes an optical device for forming first and second light distributions corresponding to first and second images having light fluxes passing through the different parts of a pupila of the object lens. The positional relationship between the two light distributions varies in accordance with the focus state of the object lens. First and second sensors sense the first and second light distributions. A signal processor for processing output signals from the first and second sensors detect the focus state of the object lens in accordance with the positional relationships between the two light distributions. The signal processor processes the signals from the first and second sensors in accordance with a predetermined formula to obtain the positional relationship between the two images to determine a degree of coincidence of the two light distributions. The signal processing means provides an output signal in accordance with the degree of coincidence of the two light distributions.

This application is a continuation of application Ser. No. 750,283 filed July 1, 1985, now abandoned.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a focus detection system for use in a camera, and more particularly to a focus detection system which can detect a focus in a far-near competition state which is caused by a plurality of objects of different object distances in a detection view field.

2. Description of the Prior Art

A focus detection system for a camera which detects a focus of an imaging lens by detecting a deviation between two images formed by dividing a pupil of the imaging lens of the camera is disclosed in U.S. Pat. No. 4,185,191 and Japanese Patent Application Laid-Open Nos. 118019/1980 and 155331/1980. In those systems, the two images formed are imaged on a sensor to photo-electrically convert the image information. The photo-electrically converted signals or the two images are processed to detect focus. The signal processing method is disclosed, for example, in U.S. Pat. No. 4,333,007. The signal processing method by the disclosed method is a excellent method for detecting a deviation from an in-focus position of a single image, but if a plurality of objects having different object distances are in a view field or if an object has a substantial three-dimensional spread, focus is set to a middle point of the plurality of objects in spite of the detection of the in-focus state by a calculation formula used in the processing and the focus is not set to a desired object. In the present specification, such a state of the objects is called "far-near competition".

A method which aims to resolve the problem of far-near competition is shown in Japanese Patent Application Laid-Open No. 75607/1981. However, this method does not completely resolve the problem of far-near competition.

A signal processing method used for detecting a focus is also shown in Japanese Patent Application No. 142306/1983 by the same inventor as that of the present invention. In this method, a drive distance (defocus distance) of a lens is determined based on a sum of minimum or maximum photo-electrically converted outputs of pixels corresponding to each other in a sensor for sensing the two images. However, this method also does not resolve the problem of far-near competition.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a system which can detects a "far-near competition" state.

It is another object of the present invention to provide a focus detection system which can determine a correct defocus distance of an object lens for any object.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a plan view of a focus detection optical system of a secondary focusing system,

FIGS. 2A, 2B and 2C are plan views for illustrating a principle of focus detection in the optical system of FIG. 1,

FIG. 3A shows an image signal for a two-dimensional object in an out-of-focus state,

FIGS. 3B and 3C respectively show an evaluation amount U(m) curve and a correlation amount V(m) curve based on the image signal shown in FIG. 3A in a first embodiment of the present invention,

FIGS. 3D and 3E show evaluation reference amount curves U₁ (m), U₂ (m) and correlation amount V₁ (m), V₂ (m) curves based on the image signal shown in FIG. 3A in a second embodiment of the present invention,

FIG. 4A shows an image signal for a two-dimension object in an in-focus state,

FIGS. 4B and 4C respectively show an evaluation amount U(m) curved and a correlation amount V(m) curve based on the image signal shown in FIG. 4A in the first embodiment of the present invention,

FIGS. 4D and 4E show evaluation reference amount curves U₁ (m), U₂ (m) and correlation amount V₁ (m), V₂ (m) curves based on the image signal shown in FIG. 4A in the second embodiment of the present invention,

FIG. 5A shows an image signal for a three-dimension object in an out-of-focus state,

FIGS. 5B and 5C respectively show an evaluation amount U(m) curved and a correlation amount V(m) curve based on the image signal shown in FIG. 5A in the first embodiment of the present invention,

FIGS. 5D and 5E shows evaluation reference amount curve U₁ (m), U₂ (m) and correlation amount V₁ (m), V₂ (m) curves based on the image signal shown in FIG. 5A in the second embodiment of the present invention,

FIG. 6A shows an image signal for a three-dimensional object in an in-focus state,

FIGS. 6B and 6C respectively show an evaluation amount U(m) curves and a correlation amount V(m) curve based on the image signal shown in FIG. 6A in the first embodiment of the present invention,

FIGS. 6D and 6E show evaluation reference amount curve U₁ (m), U₂ (m) and correlation amount V₁ (m), V₂ (m) based on the image signal shown in FIG. 6A in the second embodiment of the present invention,

FIG. 7A shows a division method of the image signal in the two embodiments of the present invention,

FIGS. 7B, 7C and 7D show correlation amount curves in divisional areas of the image signal divided by the division method shown in FIG. 7A in the first embodiment of the present invention,

FIGS. 7E, 7F and 7G show correlation amount curves in divisional areas of the image signal divided by the division method of FIG. 7A in the second embodiment of the present invention,

FIG. 8 shows a circuit diagram of one embodiment of a focus detection system of the present invention,

FIG. 9A is a flow chart showing a signal processing method in the first embodiment of the present invention, and

FIG. 9B is a flow chart showing a signal processing method in a second embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows an optical system used in the focus detection system of the present invention. A principle of focus detection of this optical system is called a secondary focusing system. The principle is explained below. In FIG. 1, a field lens 2 to be adjusted in focus state thereof is arranged coaxially with an optical axis of an imaging lens 1, and two secondary focusing lenses 3a and 3b are arranged therebehind, and photosensor arrays 4a and 4b are arranged therebehind. Numerals 5a and 5b denote stops arranged near the secondary focusing lenses 3a and 3b. The field lens 2 essentially focuses an exit pupil of the imaging lens 1 onto pupil planes of the secondary focusing lenses 3a and 3b. As a result, light fluxes impinging to the secondary focusing lenses 3a and 3b are those emitted from non-overlapping, equal-size areas on the exit pupil plane of the imaging lens 1 corresponding to the secondary focusing lenses 3a and 3b. When the spatial image formed in the vicinity of the field lens 2 is refocused onto the planes of the sensor arrays 4a and 4b by the secondary focusing lenses 3a and 3b, the positions of the two refocused images vary depending on a change of a position in the optical axis direction at which the spatial image is formed.

FIG. 2 illustrates this phenomenon. FIG. 2A shows an in-focus state, FIG. 2B shows a rear-focus state and FIG. 2C shows a fore-focus state. The two images formed on the planes of the sensor arrays 4a and 4b move oppositely on the planes of the sensor arrays 4a and 4b. An image intensity distribution is photo-electrically converted by the sensor arrays 4a and 4b and a relative positional difference between the two images is detected by an electric processing circuit to determine the focus state.

In accordance with a basic concept of the present invention, in the far-near competition state, a degree of coincidence of two images is lower than that in a normal state because the relative positional relation varies with the focus state of the imaging lens 1 (see FIG. 1) and the far-near competition state in the view field can be detected by checking the degree of coincidence. The degree of coincidence can be determined by one of the following two methods.

In the first method, a method disclosed in the U.S. Ser. No. 605,539 filed by the same inventor of the present invention is used. A correlation amount is calculated by ##EQU1## where N is the number of photo-electric conversion devices of the sensor arrays 4a and 4b, and a(i) and b(i) (i=1˜N) are outputs of i-th photo-electric conversion devices of the sensor arrays 4a and 4b. The correlation amount V(m) derived from the formula (1) is nothing but a change of U(m) calculated by ##EQU2## U(m) is a scale for the degree of coincidence of two images when the relative displacement is m. It is minimum when the deviation between the two images is minimum, that is, when the two images are coincident. At this time, V(m) which represents the change of U(m) is to be zero.

FIG. 3A shows signals a(i) and b(i) illustrating light intensity distributions of the two images, where N=24. FIGS. 3B and 3C show plots of U(m) and V(m) in the formulas (1) and (2) (m=-N/2˜N/2). As seen from 3C, an image deviation corresponding to 2.6 pixels can be detected when V(m₀)=0. A defocus distance of the imaging lens 1 is calculated based on m₀ and the lens is driven so that the two images coincide as shown in FIG. 4A. At this time, U(o)=0 and V(o)=0 as seen from FIGS. 4B and 4C.

The characteristic of the first embodiment of the present invention resides in the discovery that the degree of coincidence can be evaluated by the value of the formula (2) when m=0, that is, by ##EQU3##

For example, in a normal case where the image signals a(i) and b(i) is shown in FIG. 4A are produced, U(o)≈0 if m₀ which satisfies V(m₀)=0 is 0 in the formula (1) as seen from FIGS. 4B and 4C but U(o)>0 even if m₀ =0 in the far-near competition state shown in FIG. 6A. Accordingly, whether the object in the view field is in the far-near competition state or not can be determined by comparing U(o) in the in-focus state of the imaging lens 1 with a predetermined threshold.

When it is determined that the object in the view field is in the far-near competition state, an alarm may be issued. In the present embodiment, the area of the image signals a(i) and b(i) is divided into partially overlapping areas I, II and III as shown in FIG. 7A and V(m) in each area is calculated in accordance with the formula (1). In FIG. 7A, the number of data (the number of photo-electric conversion devices) in each of the areas I, II and III is N/2 (=12). The values of V_(I) (m) are represented by V_(I) (m), V_(II) (m) and V_(III) (m) in order to distinguish them from those for N=24.

FIGS. 7B, 7C and 7D show plots of V_(I) (m), V_(II) (m) and V_(III) (m). Since the area I includes only the image signal in an area R of FIG. 7A, m₃ which satisfies V_(I) (m₃)=0 in FIG. 7B shows the deviation distance of includes only the image signal in an area R₂, m₄ which satisfies V_(III) (m₄)=0 in FIG. 7D shows the deviation distance of the two images in the area R₂.

The area II partially includes both areas R₁ and R₂. Thus, V_(II) (m) in FIG. 7C shows the deviation distance affected by local far-near competition. Relative displacements m₃ and m₄ correspond to the lens drive distances (defocus distances) to bring the imaging lens into the in-focus state in the object areas R₁ and R₂. For example, if it is desired to bring the imaging lens 1 into the in-focus state for the object in the near object area R₁, m₃ is selected, and if it is desired to bring the imaging lens 1 into the in-focus state for the object in the far object area R₂, m₄ is selected. The selection may be preset or externally controlled. In FIG. 7A, N discrete image signals are divided into three partially overlapping areas each having N/2 data, although other division methods may be adopted with respect to the time period which it takes to complete the focus operation. The amount of calculation time for V(m) having N/2 data is approximately 1/4 of the amount of calculation time for V(m) having N data. Even if the calculation for V(m) having N/2 data is repeated three times, the total amount is only 3/4 of the amount of calculation time for V(m) having N data. Accordingly, the calculation time in the present embodiment including the calculation time of U(o) for determining the far-near competition state is not longer than the calculation time of the normal calculation.

Am embodiment for detecting the focus and an operation flow thereof are explained with reference to FIGS. 8 and 9.

FIG. 8 shows an embodiment of the focus detection system of the present invention. An optical system for forming two images whose relative positional relationship varies with the focus state of the imaging lens is that shown in FIG. 1. Numeral 8 denotes an image signal processor which may be a one-chip microcomputer having a CPU, a memory and input/output terminals. The sensor 4 comprises the sensor arrays 4a and 4b and a CCD, and images are formed on the plate-sensing planes of the sensor arrays 4a and 4b by light fluxes passing through different pupil areas of the imaging lens 1. Charges corresponding to the light intensity distributions of the images are stored and transferred by control signals φ_(c), SH, ICG from a sensor driver 5. While the sensor array 4a and 4b are separated in the present embodiment, they may be arranged in one array. When the image signal processor 8 supplies a start signal to the sensor driver 5, the sensor driver 5 sends a start of storage signal ICG together with a clock pulse φ_(c) generated by a signal CLK of a clock generator 6, to the sensor 4. The sensor 4 thus starts to store the two images, and when a predetermined storage level is reached, it sends an end of storage signal EOI to the sensor driver 5. The sensor driver 5 sends a photo-electric conversion output transfer signal SH to the sensor 4 to transfer the stored charges from the sensor to the CCD, and it also sends an end signal to the processor 8. The sensor 4 sends the analog photo-electric converted signal CS of the two images which represents the time-serially stored charges, to an A/D converter 7 in synchronism with the clock φ_(c) from the sensor driver 5. The A/D converter 7 converts the analog signal to an 8-bit digital signal in synchronism with a conversion signal ADC from the sensor driver 5. The processor 8 receives the digital time-serial signals D₀ ˜D₇ through terminals DB₀ ˜DB₇ and sequentially stores them in the memory. The processor 8 detects the deviation of the two images (relative displacement) based on the A/D converted photo-electric converted signal, that is, the image signals a(i) and b(i) (i=1˜N), where a(i) and b(i) were defined above.

Terminals RM and FM of the processor 8 are output terminals for driving a motor 12 for driving the imaging lens 1 (FIG. 1) along the optical axis direction. When RM and FM are both at high potential ("H"), transistors 11a and 11c are turned off and transistors 11b and 11d are turned on through gates 10a and 10b, and the motor 12 is electrically braked by the transistors 11b and 11d and diodes 13a and 13b. When RM and FM are both at low potential ("L"), the transistors 11a˜11d are all turned off and the motor 12 is electrically opened. When RM is "H" and FM is "L", the transistors 11a and 11d are turned off and the transistors 11b and 11c are turned on, and the motor 12 is energized from right to left in FIG. 8. When RM is "L" and FM is "H", the transistors 11b and 11 c are turned off and the transistors 11a and 11d are turned on, and the motor 12 is energized from left to right so that the motor 12 is driven in the opposite direction to that when RM is "H" and FM is "L". Terminals NF, JF and FF are drive terminals to LED's 9 which indicate the focus state.

The operation flow of the present embodiment is explained with reference to FIG. 9A. In this flow, an object in a near object area is selected when the far-near competition state occurs. Functions of the steps in the flow chart of FIG. 9A are explained below.

(S1) Set a control mode to "0". The mode 0 indicates normal signal processing, mode 1 indicates the far-near competitionstate and mode 2 indicates the in-focus state in the far-near competition state.

(S2) Receive the photo-electric converted signals a(i) and b(i) (i=1˜N) of the two images formed by the pupil division of the imaging lens, from the sensor.

(S3) Identify the mode.

(S4) If the mode 0 is identified, calculate V(m) by the normal signal processing.

(S5) Detect deviation m₀ which satisfies V(m₀)=0.

(S6) Compare an absolute value of the deviation m₀ with an in-focus threshold e₁.

(S7) If |m₀ |>e₁, it means that the imaging lens is in an out-of-focus state. Drive the imaging lens 1 by a lens drive distance (defocus distance) corresponding to the relative displacement m₀. Return to S2.

(S8) If m₀ ≦e₁, it means that the in-focus state has been obtained by the normal signal processing. Calculate V(o) to check the far-near competition.

(S9) Compare U(o) with a far-near competition threshold e₂.

(S10) If U(o)>e₂, it means that the far-near competition state has occurred. Set the control mode to "1".

(S18) If U(o)≦e₂, it means that the far-near competition state has not occurred. Indicate the in-focus state. Return to S2.

(S11) Divide the area of the image signal as shown in FIG. 7A and calculate correlation amounts V_(I) (m'), V_(II) (m') and V_(III) (m') with the number of data being N/2.

(S12) Detect m₁ ', m₂ ' and m₃ ' which satisfy V_(I) (m'₁)=0, V_(II) (m'₂)=0 and V_(III) (m'₃)=0, respectively. They indicate deviations in each of three partially overlapping divisional areas of the original image signal.

(S13) Set a minimum one of m₁ ', m₂ ' and m₃ ' as m₀ ' so that the imaging lens 1 is brought into the in-focus state for the object in the near object area when the far-near competition status occurs.

(S14) Compare the deviation m₀ ' with an in-focus threshold c₃ for the far-near competition state.

(S15) If |m₀ '|>e₃, it means that the imaging lens is not in the in-focus state and the lens is to be driven. Check the mode again. If it is the mode 1, it means that the focusing by the far-near competition is in progress. Drive the imaging lens 1 in S7.

(S16) If it is the mode 2, it means that the in-focus state was once obtained in the far-near competition state and then the out-of-focus state occurred because of change of the object. Set the mode to "0" (normal signal processing mode) and drive the lens in S7.

(S17) If |m₀ '|≦e₃, it means that the in-focus state has been obtained in the far-near competition signal processing. Set the mode to "2" and indicate the in-focus state in S18.

In the above steps, e₁, e₂ and e₃ may be arbitrarily set, and a maximum one or a medium one of m₁ ', m₂ ' and m₃ ' may be selected as m₀ ' in the step S13.

The evaluation amount U(o) in the present embodiment is not limited to the formula (5) but it may be represented by the following formula ##EQU4## where P is a positive number.

The correlation amount V(m) may be calculated by ##EQU5##

In a second embodiment of the present invention, the following formulas (1a) and (2a) are used instead of the formulas (1) and (2) described above. This method uses the system described in the U.S. Ser. No. 667,818 filed by the same assignee as that of the present invention. In the second embodiment, the correlation amount is calculated by ##EQU6## where min(x,y) and max(x,y) represent to select smaller and larger ones of the two quantities x and y, respectively.

The correlation amounts V₁ (m) and V₂ (m) calculated by the formulas (1a) and (2a) are nothing but changes of U₁ (m) and U₂ (m) calculated by the following formulas. ##EQU7## U₁ (m) and U₂ (m) are scales of degree of coincidence of two images when the relative displacement is m. When the deviation of the two images is minimum, that is, when they coincide, U₁ (m) is maximum and U₂ (m) is minimum. At this time, V₁ (m) and V₂ (m) which represent the change of U₁ (m) and U₂ (m) are to be zero.

Let us assume that the sensor arrays 4a and 4b detect the image light intensity distribution shown in FIG. 3A.

FIGS. 3D and 3E show plots of U₁ (m), U₂ (m), V₁ (m), V₂ (m) (m=-N/2˜N/2) in the formulas (1a)˜(4a). As seen from FIG. 3E, m which satisfies V₁ (m)=0 and V₂ (m)=0 is equal to 2.6, and the image deviation corresponding to 2.6 pixels can be detected by using the correlation amount of either the formula (1a) or the formula (2a). Then, the defocus distance of the imaging lens 1 is calculated based on m₀ and the lens is driven into the in-focus state. Thus, the image signals a(i) and b(i) coincide as shown in FIG. 4A. At this time, U₁ (o)=U₂ (o), V₁ (o)=0, V₂ (o)=0 as seen from FIGS. 4D and 4E.

The characteristic of the second embodiment of the present invention resides in the finding that the degree of coincidence can be evaluated by the formulas (3a) and (4a) when m=0, that is, ##EQU8##

For example, in the normal case where the image signals a(i) and b(i) shown in FIG. 4A are produced, if m₀ which satisfied V₁ (m₀)=0 or V₂ (m₀)=0 in V₁ (m) or V₂ (m) defined by the formula (1a) or (2a) is zero, U₁ (o)=U₂ (o) or W=U₂ (o)-U₁ (o)=0 as seen from FIGS. 4D and 4E, but in the far-near competition status shown in FIG. 6A, U₂ (o)>U₁ (o) or W=U₂ (o)-U₁ (o)>0 even if m₀ which satisfies V₁ (m₀)=0 or V₂ (m₀)=0 is zero. Accordingly, whether the object in the view field is in the far-near competition state or not can be determined by comparing W in the in-focus state of the imaging lens 1 with a predetermined threshold.

If the object in the view field is in the far-near competition state, an alarm may be issued In the present embodiment, the area of the signals a(i) and b(i) is divided into partially overlapping divisional areas I, II and III as shown in FIG. 7A, and V₁ (m) or V₂ (m) is calculated for each divisional area. In FIG. 7A, the number of data (the number of photo-electric conversion devices) in each of the areas I, II and III is equal to N/2 (=12). V₁ (m) and V₂ (m) in this case are represented by {V_(II) (m), V_(1II) (m), V_(1III) (m)}, {V_(2I) (m), V_(2III) (m)}. Since the area in order to distinguish them from those for N=24.

FIGS. 7E, 7F and 7G show plots of {V_(1I) (m), V_(2I) (m)}, {V_(1II) (m), V_(2II) (m)}, {V_(1III) (m), V_(2III) (m)}. Since the area I includes the image signal in only the object area R₁ of FIG. 7A, m₂ which satisfies V_(1I) (m₂)=0 or V_(2I) (m₃)=0 in FIG. 7E represents the deviation of the two images in the area R₁, and since the area III includes the image signal in only the object area R₂, m₄ which satisfies V_(1III) (m₄)=0 or V_(2III) (m₄)=0 in FIG. 7G indicates the deviation of the two images in the area R₂. The area II partially includes both areas R₁ and R₂. Thus, V_(1II) (m) or V_(2II) (m)in FIG. 7E shows the deviation distance affected by local far-near competition Relative displacements m₃ and m₄ correspond to the lens drive distances (defocus distances) to bring the imaging lens into the in-focus state in the object areas R₁ and R₂. For example, if it is desired to bring the imaging lens 1 into the in-focus state for the object in the near object area R₁, m₃ is selected, and if it is desired to bring the imaging lens 1 into the in-focus state for the object in the far object area R₂, m₄ is selected. The selection may be preset or externally controlled. In FIG. 7A, N discrete image signals are divided into three partially overlapping areas each having N/2 data, although other division method may be adopted with respect to the time period which it takes to complete the focus operation. The amount of calculation time for V₁ (m) or V₂ (m) having N/2 data is approximately 1/4 of the amount of calculation time for V₁ (m) or V₂ (m) having N data. Even if the calculation for V₁ (m) or V₂ (m) having N data is repeated three times, the total amount of calculation time is only 3/4 of the amount of calculation time for V₁ (m) or V₂ (m) having N data. Accordingly, the calculation time in the present embodiment including the calculation time of W for determining the far-near competition state is not longer than the calculation time of the normal calculation.

The operation flow of the present embodiment is now explained with reference to FIG. 9B. In this flowchart, the object in the near object area is selected when the far-near competition state occurs, as is done in the first embodiment.

Steps (S1) to (S3) are identical to the steps (S1) to (S3) of the first embodiment.

(S4) If the mode is mode 0, calculate V₁ (m) or V₂ (m) in the normal signal processing.

(S5) Detect the deviation (relative displacement) m₀ which satisfies V₁ (m₀)=0 or V₂ (m₀)=0.

(S6) Compare an absolute value of the deviation m₀ with the in-focus state threshold e₁.

(S7) If m₀ >e₁, it means that the imaging lens is in the out-of-focus state. Drive the imaging lens 1 by the lens drive distance (defocus distance) corresponding to m₀. Return to S2.

(S8) If |m₀ |≦e₁, it means that the in-focus state has been obtained by the normal signal processing. Calculate W=U₂ (o)-U₁ (o) to check the far-near competition status.

(S9) Compare W with the far-near competition threshold e₂.

(S10) If W>e₂, it means that the far-near competition status has occurred. Set the control mode to "1".

(S11) Divide the area of the image signal to divisional areas each having N/2 data as shown in FIG. 7A. Calculate the correlation amount V_(1I) (m'), V_(2I) (m'), V_(1II) (m'), V_(2II) (m'), V_(1III) (m') or V_(2III) (m'). (S12) Detect m₁ ', m₂ ' and m₃ ' which satisfy V_(1I) (m₁ ')=0, V_(2I) (m₁ ')=0,V_(1II) (m₂ ')=0, V_(2II) (m₂ ')=0, V_(1III) (m₃ ')=0 or V_(2III) (m₃ ')=0. They represent the deviations in the three partially overlapping divisional areas.

(S13) Set a minimum one of m₁ ', m₂ ' and m₃ ' as m₀ ' so that the imaging lens 1 is brought into the in-focus state for the object in the near object area when the far-near competition state occurs.

(S14) Compare the deviation m₀ ' with the in-focus state threshold e₃ in the far-near competition state.

(S15) If |m₀ '|>e₃, it means that the imaging lens is to not in the in-focus state and the imaging lens is to be driven. Check the mode again. If it is the mode 1, it means that the focusing operation by the far-near competition is in progress. Drive the imaging lens 1 is S7. Maintain the mode 1 and return to S2.

(S16) If the mode is mode 2, it means that the in-focus state was once obtained in the far-near competition state and then the out-of-focus state occurred because the object significantly changed. Set the mode to "0" normal signal processing mode) and drive the lens in S7.

(S17) If |m₀ '|≦e₃ in S14, it means that the in-focus state has been obtained in the far-near competition state. Set the mode to "2". Indicate the in-focus state in S15.

(S18) If W≦e₂, it means that the far-near competition state has not occurred. Indicate the in-focus state and return to S2.

In the above flow, e₁, e₂ and e₃ may be arbitrarily set. A maximum one or a medium one of m₁ ', m₂ ' and m₃ ' may be selected in the step S13.

In the first and second embodiments, the formula to calculate the positional deviation of the two images is used to evaluate the degree of coincidence of the two images. Alternatively, the evaluation formula in the second embodiment may be used in the first embodiment or vice versa.

In accordance with the present invention, the far-near competition status can be determined so that the accurate focus detection is attained under any condition. 

We claim:
 1. A focus detection system for detecting a focus state of an object lens, comprising:optical means for forming first and second light distributions respectively corresponding to first and second images having light reflective fluxes passing through the different parts of the object lens, whereby the positional relationship between said first and second light distributions varies in accordance with the focus state of the object lens; first and second sensing means for sensing said first and second light distributions, said first and second sensing means each having a plurality of sensor elements; and signal processing means for processing output signals from said first and second sensing means to detect the focus state of the object lens in accordance with the positional relationship between the two light distributions; said signal processing means processing the signals from said first and second sensing means in accordance with a predetermined formula to determine a degree of coincidence of the said light distributions, said signal processing means providing an output signal in accordance with the degree of similarity of said two light distributions, and said signal processing means detecting a focus state of the object lens by processing signals from two groups of sensor elements being provided in corresponding positions, and each having the same number of sensor elements, which number is smaller than the total number thereof.
 2. A focus detection system according to claim 1 wherein said first and second sensing means each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU9## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, and P is a positive number.
 3. A focus detection system according to claim 1 wherein said first and second sensing means each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU10## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from as i-th photo-electric conversion device of said second sensing means, min represents a smaller one of two real numbers x and y, and max
 4. A focus detection system according to claim 1 wherein the outputs of said first and second sensing means are divided into a plurality of partially overlapping areas for each of said first and second images. represents a larger one of the two real numbers x and y.
 5. A focus detection system according to claim 1, further comprising display means which displays the state of the focus detection in accordance with the degree of coincidence of the two light distributions in response to the output from said signal processing means.
 6. A focus detection system for detecting a focus state of an object lens, comprising:optical means including an object lens for forming first and second light distributions respectively corresponding to first and second images having respective light fluxes passing through different parts of a pupil of the object lens wherein the positional relationship between said first and second light distributions varies with the focus state of said object lens; first and second sensing means for sensing said first and second images, respectively; and signal processing means for processing output signals from said first and second sensing means to obtain the positional relationship between said two images to detect the focus state of the object lens; said signal processing means processing the signals from said first and second sensing means in accordance with a predetermined formula to determine a degree of coincidence of the two images, and when the degree of coincidence is larger than a predetermined value, dividing the outputs of said first and second sensing means into a plurality of areas for each of said first and second images, determining a value representing the positional relationship of said light distributions corresponding to said first and second images for each area, and determining the focus based on said values.
 7. A focus detection system according to claim 6 wherein said first and second sensing means each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU11## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, and P is a positive number.
 8. A focus detection system according to claim 6 wherein said first and second sensing means each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU12## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, min{x, y } represents a smaller one of two real numbers x and y, and max{x, y} represents a larger one of the two real numbers x and y.
 9. A focus detection system according to claim 6 wherein the outputs of said first and second sensing means are divided into a plurality of partially overlapping areas for each of said first and second images.
 10. A method for detecting a focus state of an object lens, comprising the steps of:forming first and second images whose positional relationship varies with the focus state of said object lens; sensing said first and second images by first and second sensing means each having a plurality of sensor elements; and processing output signals obtained in said sensing step to detect the focus state of the object lens; said signal processing steps processing the signals obtained from said sensing step in accordance with a predetermined formula to determine a degree of coincidence of said two light distributions and said signal processing step dividing an output signal is accordance with the degree of coincidence of said two light distributions, and said signal processing steps detecting a focus state of said object lens by processing signals from two groups of said sensor elements being provided in corresponding positions, and each having the same number of sensor elements, which number is smaller than the total number thereof.
 11. A focus detection method according to claim 10 wherein first and second sensing means used in said sensing step each including a plurality of photoelectric conversion devices, and the degree of coincidence U is given by ##EQU13## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, and P is a positive number.
 12. A focus detection method according to claim 10 wherein first and second sensing means used in said sensing ste each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU14## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, min{x, y} represents a smaller one of two real numbers x and y, and max{x, y} represents a larger one of the two real numbers x and y.
 13. A focus detection method according to claim 10 wherein the outputs of said first and second sensing means are divided into a plurality of partially overlapping areas for each of said first and second images.
 14. A method for detecting a focus state of an object lens, comprising the steps of:forming first and second light distributions corresponding to first and second images having light fluxes passing through different object lens wherein the positional relationship between said first and second light distributions varies with the focus state of said object lens; sensing said first and second images, respectively; and processing output signals obtained in said sensing step to detect the focus state of said object lens; said signal processing step processing the signal obtained in said sensing step in accordance with a predetermined formula to determine a degree of coincidence of the two image, and when the degree of coincidence is larger than a predetermined value, dividing the outputs obtained in said sensing step into a plurality of areas for each of said first and second images, determining a value representing the positional relationship of said two light distributions corresponding to said first and second images for each area, and detecting the focus based on said values.
 15. A focus detection method according to claim 14 wherein first and second sensing means used in said sensing step each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU15## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, and P is a positive number.
 16. A focus detection method according to claim 14 wherein first and second sensing means used in said sensing step each including a plurality of photo-electric conversion devices, and the degree of coincidence U is given by ##EQU16## where a(i) is an output from an i-th photo-electric conversion device of said first sensing means, b(i) is an output from an i-th photo-electric conversion device of said second sensing means, min{x, y} represents a smaller one of two real numbers x and y, and max{x, y} represents a larger one of the two real numbers x and y.
 17. A focus detection method according to claim 14 wherein the outputs of said first and second sensing means are divided into a plurality of partially overlapping areas for each of said first and second images.
 18. A focus detection system for detecting a focus state of an object lens, comprising:optical means for forming first and second light distributions respectively corresponding to first and second images having light reflective fluxes passing through the different parts of the object lens, whereby the positional relationship between said first and second light distributions varies in accordance with the focus state of the object lens; first and second sensing means for sensing said first and second light distributions, said first and second sensing means each having a plurality of sensor elements; and signal processing means for processing output signals from said first and second sensing means to detect the focus state of the object lens in accordance with the positional relationship between the two light distributions, said signal processing means performing a correlational calculation by using the signals from said each of said plurality of sensor elements and evaluating said signals in accordance with a predetermined conditional formula, said signal processing means adopting the result of the correlational calculation when the evaluation satisfies the conditional formula and, when the evaluation does not satisfy the conditional formula, performing another correlational calculation to adopt the result as information of the focus adjusting condition on the basis of signals from continuous sensor elements the number of which is smaller than the number of elements in each of said plurality of sensor elements and which correspond with each other in the positional relationship thereof.
 19. A focus detection system for detecting a focus state of an object lens, comprising:optical means for forming first and second light distributions respectively corresponding to first and second images having light reflective fluxes passing through the different parts of the object lens, whereby the positional relationship between said first and second light distributions varies in accordance with the focus state of the object lens; first and second sensing means for sensing said first and second light distributions said first and second sensing means respectively including a sensing area constituted by a plurality of sensor elements and including a plurality of sensing sub-areas, said sub-areas being narrower than said sensing area and not overlapping each other; and signal processing means for performing a first correlational calculation on the basis of the signals from the sensor elements in said sensing area and for performing a second correlational calculation on the basis of the signals from the sensor elements in said sub-areas, said second correlational calculation being executed when an evaluation of the signals from sensing area does not satisfy a predetermined condition.
 20. A focus detection system according to claim 19, wherein of said sub-areas is previously selected and the second correlational calculation on the basis of the selected sub-area is adopted as a result.
 21. A focus detection system according to claim 19, wherein one of the second correlation calculation results on the basis of said sub-areas is adopted by evaluating the results. 